﻿//http://flot.googlecode.com/svn/trunk/API.txt

namespace SimpleServiceBus.EndpointMonitor.Web.Helpers.Flot.FlotOptions
{
    public class FlotSeriesOptions
    {
        public FlotSeriesOptions()
        {
            Label = "#seriesName#";
            Data = "#seriesData#";
            Captions = "#captionData#";
            Identifiers = "#identifierData#";

            Lines = new FlotLineSeriesOptions();
            Bars = new FlotBarSeriesOptions();
            Points = new FlotPointSeriesOptions();
            Threshold = new FlotThresholdOptions();
        }

        public FlotLineSeriesOptions Lines { get; private set; }
        public FlotBarSeriesOptions Bars { get; private set; }
        public FlotPointSeriesOptions Points { get; private set; }
        public int? ShadowSize { get; set; }
        public FlotThresholdOptions Threshold { get; private set; }

        public string Label { get; set; }
        public string Color { get; set; }
        //Does this work?
        public string[] Colors { get; set; }
        
        public bool? Clickable { get; set; }
        public bool? Hoverable { get; set; }
        
        public object Data { get; set; }

        
        /// <summary>
        /// 1 or 2 (indicate left or right axis)
        /// </summary>
        public int? Xaxis { get; set; }
        
        /// <summary>
        /// 1 or 2 (indicate left or right axis)
        /// </summary>
        public int? Yaxis { get; set; }
        
        //IMPORTANT: The X and Y axis naming conventions differ for easy serialization to
        //the JSON required by FLOT, please do not 'fix' them :) 

        public object Captions { get; set; }

        public object Identifiers { get; set; }
    }
}